//
//  TimeHelper.h
//  HjxWholesaler
//
//  Created by hjxmall-Design on 16/4/27.
//  Copyright © 2016年 HJX. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TimeHelper : NSObject
+ (NSString *)getCurrentTimeFormat:(NSString *)format;
/**
 *  获取时间，根据年月日
 */
+(NSDate *)getDateWithYMDString:(NSString *)timeStr;
+(NSDate *)getDateWithYMD_HMSString:(NSString *)timeStr;
+(NSString *)getTimeV_YMDFromDate:(NSDate *)date;
+(NSString *)getTimeH_YMDFromDate:(NSDate *)date;
+(NSString *)getTimeYMD_HMSFromDate:(NSDate *)date;
+(NSString *)getTime_YMDFromDate:(NSDate *)date;
+(NSString *)getTime_YMDHMSSSSFromDate:(NSDate *)date;
+(NSString *)getTime_YMDHMSFromDate:(NSDate *)date;
+(NSString *)getYearMonthFromDate:(NSDate *)date;

/**
 *  获取日，根据年月日
 */
+(NSString *)getTimeDayWithYMDString:(NSString *)timeStr;

+(NSString *)getTimeDayDFromDate:(NSDate *)date;
/**
 *  获取日，根据时间
 */
+(NSString *)getTimeDayFromDate:(NSDate *)date;
/**
 *  获取月，根据时间
 */
+(NSString *)getTimeMonthFromDate:(NSDate *)date;

+(NSString *)getTimeHHmmFromDate:(NSDate *)date;

/**
 *  获取年，根据时间
 */
+(NSString *)getTimeYearFromDate:(NSDate *)date;

/**
 *  获取周几，根据时间
 */
+(NSString *)getWeekdayStringFromDate:(NSDate*)date;

/**
 *  获取周几，根据时间
 */
+(NSInteger)getWeekdayNumStringFromDate:(NSDate*)date;

/**
 获取前一天
 */
+(NSString *)getYesterdayTimeFormat:(NSString *)format;

/**
 将YYYY-MM-dd 转成 YYYY年MM月dd日
 */
+ (NSString *)changeFormatWithDateString:(NSString *)dateStr;

/**
 *  获取月，根据年月日
 */
+(NSString *)getTimeMonthWithYMDString:(NSString *)timeStr;
/**
 *  获取指定月的第一天和最后一天
 */
+ (NSString *)getMonthBeginAndEndWith:(NSString *)dateStr;
/**
 *  获取上月初一的时间
 */
+ (NSString *)getLastMonthFirstDayTime;
//获取当前时间戳
+ (NSString *)getCurrentTimestamp;

+ (NSString*)getDownTime:(NSString*)time downDays:(NSInteger)days;
+(NSString *)getUTCFromTime:(NSString*)time;
@end
